home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / corep.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  8KB  |  149 lines

  1. /*
  2. * $XConsortium: CoreP.h,v 1.16 89/10/04 12:22:50 swick Exp $
  3. * $oHeader: CoreP.h,v 1.2 88/08/18 15:54:37 asente Exp $
  4. */
  5.  
  6. /***********************************************************
  7. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  8. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  9.  
  10.                         All Rights Reserved
  11.  
  12. Permission to use, copy, modify, and distribute this software and its 
  13. documentation for any purpose and without fee is hereby granted, 
  14. provided that the above copyright notice appear in all copies and that
  15. both that copyright notice and this permission notice appear in 
  16. supporting documentation, and that the names of Digital or MIT not be
  17. used in advertising or publicity pertaining to distribution of the
  18. software without specific, written prior permission.  
  19.  
  20. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  21. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  22. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  23. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  24. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  25. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  26. SOFTWARE.
  27.  
  28. ******************************************************************/
  29.  
  30. #ifndef XtCoreP_h
  31. #define XtCoreP_h
  32.  
  33. #include <X11/Core.h>
  34.  
  35. externalref int _XtInheritTranslations;
  36.  
  37. #define XtInheritTranslations  ((String) &_XtInheritTranslations)
  38. #define XtInheritRealize ((XtRealizeProc) _XtInherit)
  39. #define XtInheritResize ((XtWidgetProc) _XtInherit)
  40. #define XtInheritExpose ((XtExposeProc) _XtInherit)
  41. #define XtInheritSetValuesAlmost ((XtAlmostProc) _XtInherit)
  42. #define XtInheritAcceptFocus ((XtAcceptFocusProc) _XtInherit)
  43. #define XtInheritQueryGeometry ((XtGeometryHandler) _XtInherit)
  44. #define XtInheritDisplayAccelerator ((XtStringProc) _XtInherit)
  45.  
  46. /***************************************************************
  47.  * Widget Core Data Structures
  48.  *
  49.  *
  50.  **************************************************************/
  51.  
  52. typedef struct _CorePart {
  53.     Widget        self;        /* pointer to widget itself         */
  54.     WidgetClass        widget_class;    /* pointer to Widget's ClassRec         */
  55.     Widget        parent;        /* parent widget               */
  56.     XrmName         xrm_name;        /* widget resource name quarkified   */
  57.     Boolean         being_destroyed;    /* marked for destroy             */
  58.     XtCallbackList  destroy_callbacks;    /* who to call when widget destroyed */
  59.     XtPointer       constraints;        /* constraint record                 */
  60.     Position        x, y;        /* window position             */
  61.     Dimension       width, height;    /* window dimensions             */
  62.     Dimension       border_width;    /* window border width             */
  63.     Boolean         managed;            /* is widget geometry managed?       */
  64.     Boolean        sensitive;        /* is widget sensitive to user events*/
  65.     Boolean         ancestor_sensitive;    /* are all ancestors sensitive?      */
  66.     XtEventTable    event_table;    /* private to event dispatcher       */
  67.     XtTMRec        tm;                 /* translation management            */
  68.     XtTranslations  accelerators;       /* accelerator translations          */
  69.     Pixel        border_pixel;    /* window border pixel             */
  70.     Pixmap          border_pixmap;    /* window border pixmap or NULL      */
  71.     WidgetList      popup_list;         /* list of popups                    */
  72.     Cardinal        num_popups;         /* how many popups                   */
  73.     String          name;        /* widget resource name             */
  74.     Screen        *screen;        /* window's screen             */
  75.     Colormap        colormap;           /* colormap                          */
  76.     Window        window;        /* window ID                 */
  77.     Cardinal        depth;        /* number of planes in window        */
  78.     Pixel        background_pixel;    /* window background pixel         */
  79.     Pixmap          background_pixmap;    /* window background pixmap or NULL  */
  80.     Boolean         visible;        /* is window mapped and not occluded?*/
  81.     Boolean        mapped_when_managed;/* map window if it's managed?       */
  82. } CorePart;
  83.  
  84. typedef struct _WidgetRec {
  85.     CorePart    core;
  86.  } WidgetRec, CoreRec;
  87.  
  88.  
  89.  
  90. /******************************************************************
  91.  *
  92.  * Core Class Structure. Widgets, regardless of their class, will have
  93.  * these fields.  All widgets of a given class will have the same values
  94.  * for these fields.  Widgets of a given class may also have additional
  95.  * common fields.  These additional fields are included in incremental
  96.  * class structures, such as CommandClass.
  97.  *
  98.  * The fields that are specific to this subclass, as opposed to fields that
  99.  * are part of the superclass, are called "subclass fields" below.  Many
  100.  * procedures are responsible only for the subclass fields, and not for
  101.  * any superclass fields.
  102.  *
  103.  ********************************************************************/
  104.  
  105. typedef struct _CoreClassPart {
  106.     WidgetClass     superclass;        /* pointer to superclass ClassRec   */
  107.     String          class_name;        /* widget resource class name       */
  108.     Cardinal        widget_size;    /* size in bytes of widget record   */
  109.     XtProc        class_initialize;   /* class initialization proc        */
  110.     XtWidgetClassProc class_part_initialize; /* dynamic initialization        */
  111.     XtEnum          class_inited;       /* has class been initialized?      */
  112.     XtInitProc      initialize;        /* initialize subclass fields       */
  113.     XtArgsProc      initialize_hook;    /* notify that initialize called    */
  114.     XtRealizeProc   realize;        /* XCreateWindow for widget        */
  115.     XtActionList    actions;        /* widget semantics name to proc map */
  116.     Cardinal        num_actions;    /* number of entries in actions     */
  117.     XtResourceList  resources;        /* resources for subclass fields    */
  118.     Cardinal        num_resources;      /* number of entries in resources   */
  119.     XrmClass        xrm_class;        /* resource class quarkified        */
  120.     Boolean         compress_motion;    /* compress MotionNotify for widget */
  121.     XtEnum          compress_exposure;  /* compress Expose events for widget*/
  122.     Boolean         compress_enterleave;/* compress enter and leave events  */
  123.     Boolean         visible_interest;   /* select for VisibilityNotify      */
  124.     XtWidgetProc    destroy;        /* free data for subclass pointers  */
  125.     XtWidgetProc    resize;        /* geom manager changed widget size */
  126.     XtExposeProc    expose;        /* rediplay window            */
  127.     XtSetValuesFunc set_values;        /* set subclass resource values     */
  128.     XtArgsFunc      set_values_hook;    /* notify that set_values called    */
  129.     XtAlmostProc    set_values_almost;  /* set_values got "Almost" geo reply */
  130.     XtArgsProc      get_values_hook;    /* notify that get_values called    */
  131.     XtAcceptFocusProc accept_focus;     /* assign input focus to widget     */
  132.     XtVersionType   version;            /* version of intrinsics used        */
  133.     XtPointer       callback_private;   /* list of callback offsets       */
  134.     String          tm_table;           /* state machine                    */
  135.     XtGeometryHandler query_geometry;    /* return preferred geometry        */
  136.     XtStringProc    display_accelerator;/* display your accelerator        */
  137.     XtPointer        extension;        /* pointer to extension record      */
  138.  } CoreClassPart;
  139.  
  140. typedef struct _WidgetClassRec {
  141.     CoreClassPart core_class;
  142. } WidgetClassRec, CoreClassRec;
  143.  
  144. externalref WidgetClassRec widgetClassRec;
  145. #define coreClassRec widgetClassRec
  146.  
  147. #endif /* _XtCoreP_h */
  148. /* DON'T ADD STUFF AFTER THIS #endif */
  149.